package day22;

import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.Map.Entry;

public class TestSystemProperties {
	public static void main(String[] args) {
		Properties props = System.getProperties();
		for (Iterator<Entry<Object, Object>> it = props.entrySet().iterator(); it.hasNext();) {
			Map.Entry<Object, Object> me =  it.next();
			System.out.println(me.getKey()+":"+me.getValue());
		}
		System.out.println("=====================");
		String encoding = System.getProperty("file.encoding");
		System.out.println(encoding);
		System.setProperty("author", "guodh");
		System.out.println(System.getProperty("author"));
		System.out.println("===========================");
		String fileName = System.getProperty("myFileName");
		System.out.println(fileName);
	}
}
